IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[UpdateProvincia]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[UpdateProvincia]
GO

CREATE PROCEDURE [dbo].[UpdateProvincia]
(
	@IdProvincia int,
	@IdDepartamento int,
	@Nombre varchar(150),
	@Estado bit
)
AS
BEGIN
	SET NOCOUNT ON

	UPDATE [Provincia]
	SET [IdDepartamento] = @IdDepartamento, 
		[Nombre] = @Nombre, 
		[Estado] = @Estado
	WHERE [IdProvincia] = @IdProvincia

	SET NOCOUNT OFF
END

GO
